import { $post, $put } from '@js/request'

// 新增数据
export async function addRequest (d: { [k: string]: any }): Promise<void> {
  const res = await $post('/api/commission/work_item', d)
  return res.data
}

// 修改数据
export async function updateRequest (d: { [k: string]: any }): Promise<void> {
  const id: string = d.id
  delete d.id
  const res = await $put(`/api/commission/work_item/${id}`, d)
  return res.data
}
